package com.leisurexi.ioc.metadata;

import com.leisurexi.ioc.domain.User;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * @author: leisurexi
 * @date: 2020-06-25 1:07
 * @since JDK 1.8
 */
public class ExtensibleXmlAuthoringDemo {

	public static void main(String[] args) {
		DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
		XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
		reader.loadBeanDefinitions("META-INF/user-context.xml");
		User user = beanFactory.getBean(User.class);
		System.out.println(user);
	}

}
